<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
   xmlns:f="http://java.sun.com/jsf/core"
     xmlns:p="http://primefaces.org/ui"
    xmlns:c="http://java.sun.com/jstl/core" 
      >
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
       

<f:subview id="header">

    <h:form>
        <div style="float: right;">
            <p:inputText value="#{catalog.keyword}"/>
            <p:commandButton action="#{catalog.doSearch}" value="Search"/>

            <div style="margin-top: 20px;">
                
                <h:panelGroup rendered="#{!account.isLogged}">
                    
                    <h:commandLink action="#{account.doGoOnSignIn}">
                            <h:outputText value="Sign on"/>
                     </h:commandLink>
                    
                </h:panelGroup>
                
                <h:panelGroup rendered="#{account.isLogged}">
                    
                     <h:commandLink action="showaccount.jsf?faces-redirect=true">
                            <h:outputText value="Account"/>
                        </h:commandLink>
                         -  
                        <h:commandLink action="showcart">
                            <h:outputText value="Cart"/>
                        </h:commandLink>
                       -  
                        <h:commandLink action="#{account.doSignOff}">
                            <h:outputText value="Sign off"/>
                        </h:commandLink>
                    
                </h:panelGroup>
                
            </div>
        </div>
        <h:commandLink action="main">
            <h:graphicImage url="images/banner_logo.gif"/>
        </h:commandLink>
    </h:form>
</f:subview>


    </h:body>
</html>

